<?php

namespace app\api\controller;

use think\Controller;

class Store extends Base
{
    public function lists()
    {
        $page = input('page', 1);
        $row = input('row', 10);
        $name = input('name');
        $longitude = input('longitude');
        $latitude = input('latitude');
        $data = \app\api\model\Store::getList([],$longitude,$latitude,$page,$row);
        return self::apiResp($data);
    }

    public function detail()
    {
        $id = input('id');
        $data = \app\api\model\Store::getById($id);
        return self::apiResp($data);
    }

	//获取用户当前位置附近的门店
	public function nearbyList($lng,$lat)
	{
		$data = \app\api\model\Store::nearbyList($lng,$lat);
		return self::apiResp($data);
	}



}
